<?php
define('MAIN_DOMAIN','www.mmvip.net');
define('ACCESS_TOKEN_URL','https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s');
define('OAUTH_URL','https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect');
define('OAUTH_URL_OAUTH','https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect');
define('OAUTH_URL_CALLBCK','http://'.MAIN_DOMAIN.'/user/order?app_id=%d');
define('OAUTH_URL_BARBER_CALLBCK','http://'.MAIN_DOMAIN.'/user/action?app_id=%d');
define('USER_TOKEN','https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code ');
define('MENU_CREATE','https://api.weixin.qq.com/cgi-bin/menu/create?access_token=%s');

$menu = urldecode(json_encode(array('button'=>array(array("type"=>"view",
               "name"=>urlencode("活动"),
               "url"=>"http://".MAIN_DOMAIN."/user/action?app_id=%d"),array("type"=>"view",
               "name"=>urlencode("我的订单"),
               "url"=>"http://".MAIN_DOMAIN."/user/order?app_id=%d")))));

define('WEIXIN_MENU',$menu);

define('SENDALL','https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=%s');// 群发
define('OPENID','https://api.weixin.qq.com/cgi-bin/user/get?access_token=%s&next_openid=%s'); //获取用户列表
define('UPLOAD_MEDIA',"http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s");//多媒体上传
define('GET_URL',"https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token=%s");//获取图片url
define('NEWS_UPLOAD',"https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=%s");//上传图文素材

define(WEIXIN_TICKET,'https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=%s');

define('WEIXIN_MSG_PUSH','https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=%s');
define('WEINXIN_PAY_MSG_MODEL_ID','k423LuzfXCg-6nWt0BTCDXKMps3eU5NNfheMwOEfagY');

//define('WEIXIN_PAY_APP_ID','wx8312264abf7f74cb');
define('WEIXIN_PAY_APP_ID','wx048ebe3199b20eef');
//define('WEIXIN_PAY_APP_ID','wx0d730883e477aa57');
//define('WEIXIN_PAY_SECRET','ee3317ae289c22539e269e5e420e4214');
define('WEIXIN_PAY_SECRET','c4b2270a6842aea9f26f7c65753b773c');
//define('WEIXIN_PAY_SECRET','19cab93b46a9c1a1cd00c738ce8165e1');
define('WEIXIN_TICKET_JS','https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=%s&type=jsapi');
//define('WEIXIN_USER','https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid=%s&lang=zh_CN ');
define('WEIXIN_USER','https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN ');
